package com.zx.mobile.service.proxy.noticelog;

import com.zx.mobile.domain.noticelog.NoticeLogNewRequest;
import com.zx.mobile.domain.noticelog.NoticeLogNewResponse;
import org.apache.commons.lang3.StringUtils;

public class NoticeLogNewCommonProxy {

    /**
     * 实时公告查询
     *
     * @return
     */
    public static String checkNoticeLogRequest(NoticeLogNewRequest noticeLogNewRequest ) {
        if (StringUtils.isNotBlank(noticeLogNewRequest.getPlatformType())) {
            if (!("A".equals(noticeLogNewRequest.getPlatformType()) || "iPhone"
                    .equals(noticeLogNewRequest.getPlatformType()))) {
                return "平台类型不合法";
            }
        } else {
            return "输入项必填";
        }

        return null;
    }

    /**
     * 实时公告查询
     *
     * @param noticeLogNewRequest
     * @return
     */
    public static NoticeLogNewResponse getNoticeLogResponse(
            NoticeLogNewRequest noticeLogNewRequest) {
        NoticeLogNewResponse noticeLogNewResponse = new NoticeLogNewResponse();
        noticeLogNewResponse.setReturnCode("0000");
        noticeLogNewResponse.setReturnMsg("实时公告查询获取成功");
        return noticeLogNewResponse;
    }
}
